# -*- coding: utf-8 -*-

"""
@Datetime: 2019/5/21
@Author: Zhang Yafei
"""


def func(a, b, c=33, *args, **kwargs):
    print("-" * 30)
    print(a)
    print(b)
    print(c)
    print(args)
    print(kwargs)


# result = a+b+args
# print("result=%d"%result)

# func(11,22,33,44,55,66,77,task=99,done=89)
A = (44, 55, 66)
B = {"name": "laowang", "age": 18}
func(11, 22, 33, *A, **B)
# sum_2_nums(11)#错误,因为形参中至少要2个实参


def send_alert(msg,*users,age): # (['alex','xxx','iiii'],) --> ('alex','xxx','iiii')
    for u in users:
        print('报警发送给',u)


# 如果参数中出现 ＊users,传递的参数就可以不再是固定个数，传过来的所有参数打包元祖
# 方式一：
# send_alert('别他么狼了','alex','xxx','xxx','ooo')
# send_alert('别他么狼了','alex')
# send_alert('别他么狼了','alex','xxx')
# send_alert('别他么狼了','alex','xxx','iiii')
# 方式二：
# send_alert('别他么狼了',*['alex','xxx','iiii'])

# send_alert("alex","rain",'eric',age=22)
